GdPicture.NET.14 (COM - ActiveX)~GdPicture14_namespace
/ GdPicture.NET.14 (COM - ActiveX)~GdPicture14.GdViewer
/ PrintGetQuality Method
PrintGetQuality Method (GdViewer)
In This Topic
Returns the printer quality setting of the active printer. This setting matches the PrinterResolutionKind property included in the
PrinterSettings.PrinterResolutions parameter of the active printer.
Syntax
Return Value
A member of the PrintQuality enumeration. The value of the active printer quality setting.
The GdViewer.GetStat method can be subsequently used or the GdViewer.PrintGetStat method to determine if this method has been successful.
Example
How to find out some properties of the currently selected (active) printer.
'We assume that the GdViewer1 control has been properly integrated.
Dim message As String = ""
Dim curPrinter As String = GdViewer1.PrintGetActivePrinter()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = "Active printer: " + curPrinter + vbCrLf
Else
message = "The PrintGetActivePrinter() method has failed with the status: " + GdViewer1.GetStat()
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnAlign As PrintAlignment = GdViewer1.PrintGetAlignment()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " alignment: " + prnAlign.ToString() + vbCrLf
Else
message = "The PrintGetAlignment() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnCollate As Boolean = GdViewer1.PrintGetCollate()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " collate: " + prnCollate.ToString() + vbCrLf
Else
message = "The PrintGetCollate() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnColorMode As PrinterColorMode = GdViewer1.PrintGetColorMode()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " color mode: " + prnColorMode.ToString() + vbCrLf
Else
message = "The PrintGetColorMode() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnDuplex As System.Drawing.Printing.Duplex = GdViewer1.PrintGetDuplexMode()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " duplex: " + prnDuplex.ToString() + vbCrLf
Else
message = "The PrintGetDuplexMode() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnOrientation As PrinterOrientation = GdViewer1.PrintGetOrientation()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " orientation: " + prnOrientation.ToString() + vbCrLf
Else
message = "The PrintGetOrientation() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() = GdPictureStatus.OK Then
Dim prnQuality As PrintQuality = GdViewer1.PrintGetQuality()
If GdViewer1.GetStat() = GdPictureStatus.OK Then
message = message + " quality: " + prnQuality.ToString() + vbCrLf
Else
message = "The PrintGetQuality() method has failed with the status: " + GdViewer1.GetStat()
End If
End If
If GdViewer1.GetStat() <> GdPictureStatus.OK Then
message = "The example has NOT been followed successfully. Status: " + GdViewer1.GetStat().ToString()
End If
MessageBox.Show(message, "GdViewer.PrintGetQuality")
//We assume that the GdViewer1 control has been properly integrated.
string message = "";
string curPrinter = GdViewer1.PrintGetActivePrinter();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = "Active printer: " + curPrinter + "\n";
else
message = "The PrintGetActivePrinter() method has failed with the status: " + GdViewer1.GetStat();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
PrintAlignment prnAlign = GdViewer1.PrintGetAlignment();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " alignment: " + prnAlign.ToString() + "\n";
else
message = "The PrintGetAlignment() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
bool prnCollate = GdViewer1.PrintGetCollate();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " collate: " + prnCollate.ToString() + "\n";
else
message = "The PrintGetCollate() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
PrinterColorMode prnColorMode = GdViewer1.PrintGetColorMode();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " color mode: " + prnColorMode.ToString() + "\n";
else
message = "The PrintGetColorMode() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
System.Drawing.Printing.Duplex prnDuplex = GdViewer1.PrintGetDuplexMode();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " duplex: " + prnDuplex.ToString() + "\n";
else
message = "The PrintGetDuplexMode() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
PrinterOrientation prnOrientation = GdViewer1.PrintGetOrientation();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " orientation: " + prnOrientation.ToString() + "\n";
else
message = "The PrintGetOrientation() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() == GdPictureStatus.OK)
{
PrintQuality prnQuality = GdViewer1.PrintGetQuality();
if (GdViewer1.GetStat() == GdPictureStatus.OK)
message = message + " quality: " + prnQuality.ToString() + "\n";
else
message = "The PrintGetQuality() method has failed with the status: " + GdViewer1.GetStat();
}
if (GdViewer1.GetStat() != GdPictureStatus.OK)
{
message = "The example has NOT been followed successfully. Status: " + GdViewer1.GetStat().ToString();
}
MessageBox.Show(message, "GdViewer.PrintGetQuality");
See Also